package com.jeesite.modules.mo.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.ic.entity.IcUser;

/**
 * 用户提现Entity
 * @author 李寒冰
 * @version 2024-10-23
 */
@Table(name="mo_tixian", alias="a", label="用户提现信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="user_id", attrName="userId", label="user_id"),
		@Column(name="work_date", attrName="workDate", label="提现时间"),
		@Column(name="type", attrName="type", label="提现方式 1支付宝"),
		@Column(name="money", attrName="money", label="提现金额"),
		@Column(name="pay_id", attrName="payId", label="支付ID"),
		@Column(name="tixian_status", attrName="tixianStatus", label="1提交中  2提现成功 3提现失败 4提交失败"),
		@Column(name="actual_money", attrName="actualMoney", label="实际提现金额"),
		@Column(name="fail_msg", attrName="failMsg", label="提现失败原因"),
	}, orderBy="a.id DESC"
)
public class MoTixian extends DataEntity<MoTixian> {
	
	private static final long serialVersionUID = 1L;
	private String userId;		// user_id
	private Date workDate;		// 提现时间
	private Integer type;		// 提现方式
	private Double money;		// 提现金额
	private String payId;
	private String tixianStatus;
	private Double actualMoney;
	private String failMsg;
	private String mobile;

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Double getActualMoney() {
		return actualMoney;
	}

	public void setActualMoney(Double actualMoney) {
		this.actualMoney = actualMoney;
	}

	public String getFailMsg() {
		return failMsg;
	}

	public void setFailMsg(String failMsg) {
		this.failMsg = failMsg;
	}

	public String getPayId() {
		return payId;
	}

	public void setPayId(String payId) {
		this.payId = payId;
	}

	public String getTixianStatus() {
		return tixianStatus;
	}

	public void setTixianStatus(String tixianStatus) {
		this.tixianStatus = tixianStatus;
	}

	private IcUser icUser;

	public IcUser getIcUser() {
		return icUser;
	}

	public void setIcUser(IcUser icUser) {
		this.icUser = icUser;
	}

	public MoTixian() {
		this(null);
	}
	
	public MoTixian(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="user_id长度不能超过 50 个字符")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getWorkDate() {
		return workDate;
	}

	public void setWorkDate(Date workDate) {
		this.workDate = workDate;
	}
	
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	
	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public void setWorkDateStart(String workDateStart) {
		this.sqlMap.getWhere().and("work_date",QueryType.GTE,workDateStart);
	}

	public void setWorkDateEnd(String workDateEnd) {
		this.sqlMap.getWhere().and("work_date",QueryType.LTE,workDateEnd);
	}

}